#include "../commen/util.hpp"
#include <iostream>
#include <string>

using namespace ns_util;

int main()
{
    std::string cookie = "Cookie: sessionId=123456;";
    std::string fin = ";";
    std::string key = "sessionId=";
    std::pair<bool, std::string> kv = StringUtil::getHTTPHeaderValue(cookie, key, fin);
    if (kv.first)
        std::cout << kv.second << std::endl;
    else
        std::cout << "failed" << std::endl;
    return 0;
}